

***** Replication do file for The Political Economy of Peacekeeping: Civil-military Resource Substitution through International Brokerage 

************************* Authors:
***Nazmus Sakib, University of Kentucky. email: nirjhor.sakib@gmail.com
***Md Muhibbur Rahman, University of Texas, Austin. email: r.muhib@utexas.edu

*** December 2022

***********************************************************************************************************************************



*** Loading data and declaring panel

use pkomilspend_data, clear 
xtset ccode year 



*** Figure 1: Bangladesh's troops contribution and military spending

sort year 
gen troops100 = max_total_peacekeeper/100
gen milexp100 = milexp*100


graph twoway line milexp100 troops100 year if ccode==771



*** Table 1: Troops contribution by year, top five countries 

sort year
by year: tab max_total_peacekeeper if ccode==771
by year: tab max_total_peacekeeper if ccode==770
by year: tab max_total_peacekeeper if ccode==750
by year: tab max_total_peacekeeper if ccode==475
by year: tab max_total_peacekeeper if ccode==790



*** Main models 



*** Table 2: Fixed effects models: PKO participation and defense spending


use pkomilspend_data, clear 
xtset ccode year 


* IV: troops dummy

xtreg ln_milexp L.troop_dummy L.ln_milsize L.ln_gdppc L.polity L.civilwar L.terrrivalry L.midhi3 L.defense i.year, fe 
estimate store m01

* IV: total number of peacekeepers 

xtreg ln_milexp L.ln_max_total_peacekeeper L.ln_milsize L.ln_gdppc L.polity L.civilwar L.terrrivalry L.midhi3 L.defense i.year, fe 
estimate store m02

esttab m01 m02 using coeftab01.tex, se wide nogaps varwidth(40) label



*** Table 3: ADL models: PKO participation and defense spending

* IV: troops dummy

xtregar ln_milexp L.ln_milexp troop_dummy L.troop_dummy ln_milsize ln_gdppc polity L.civilwar L.terrrivalry L.midhi3 defense
estimate store m03

* IV: total number of peacekeepers 

xtregar ln_milexp L.ln_milexp ln_max_total_peacekeeper L.ln_max_total_peacekeeper ln_milsize ln_gdppc polity L.civilwar L.terrrivalry L.midhi3 defense
estimate store m04

esttab m03 m04 using coeftab02.tex, se wide nogaps varwidth(40) label




*** Figure 2: Coefficients of PKO troops variable with 95% confidence internvals 

esttab m01 m02 using coef01.tex, se wide nogaps varwidth(40) label
esttab m03 m04 using coef02.tex, se wide nogaps varwidth(40) label
esttab m01 m02 m03 m04 using ci.tex, ci wide nogaps varwidth(40) label

* Note: based on the coefficients and CI taken from the above tables, Figure 2 is created mannually using R. 




*** Substantive, Dynamic and Long-term Effects


*** Figure 3: Substantive effects

* Predicted average millitary expenditure using margins 

xtreg ln_milexp i.l1_troop_dummy L.ln_milsize L.ln_gdppc L.polity L.civilwar L.terrrivalry L.midhi3 L.defense i.year, fe 
margins l1_troop_dummy, atmeans expression(exp(predict(xb)))
marginsplot, recastci(rarea)

xtreg ln_milexp c.l1_ln_max_total_peacekeeper L.ln_milsize L.ln_gdppc L.polity L.civilwar L.terrrivalry L.midhi3 L.defense i.year, fe 
margins, at(l1_ln_max_total_peacekeeper==(0(1)9)) atmeans expression(exp(predict(xb)))
marginsplot, recast(line) recastci(rarea)


*** Figure 4: Dynamic and long-term effects

* IRF and SRF from the ADL(1,1) model

xtregar ln_milexp L.ln_milexp troop_dummy L.troop_dummy ln_milsize ln_gdppc polity civilwar terrrivalry midhi3 defense
matrix B=e(b)
matrix list B

gen k=_n-1 if _n<=22
gen irf=B[1,2] if k==0
replace irf=(B[1,1]^(k-1))*(B[1,1]*B[1,2]+B[1,3]) if k>=1
scatter irf k, connect(l) name(g001)

gen srf=sum(irf)
scatter srf k, connect(l) name(g002)


************************************************************************************************************************************************


*** Appendices


*** Figure 5: Distribution of the dependent variable 

hist milexp
hist ln_milexp



*** Table 4: Summary statistics 

drop if ln_milexp==.

estpost sum ln_milexp troop_dummy ln_max_total_peacekeeper lnmaxUN_troops ln_milsize ln_gdppc ln_govspend polity civilwar terrrivalry midhi3 defense   
esttab using dstab_1.tex, cell ((count mean sd min max)) b(3) varwidth(30)



*** Figure 6: Distribution of the independent variables 

graph hbar, over(troop_dummy)
hist ln_max_total_peacekeeper
hist max_total_peacekeeper



*** Table 5: Hausman test (initial diagnostic models)

*** Fixed effects

xtreg ln_milexp L.troop_dummy L.ln_milsize L.ln_gdppc L.polity L.civilwar L.terrrivalry L.midhi3 L.defense, fe 
estimate store FE

*** Random effects

xtreg ln_milexp L.troop_dummy L.ln_milsize L.ln_gdppc L.polity L.civilwar L.terrrivalry L.midhi3 L.defense, re
estimate store RE

*** Hausman test

hausman FE RE, sigmamore 

esttab FE RE using tab00.tex, se r2 varwidth(40) 

* Note: Hausman test coefficients slightly vary from those presented in the table, as we did the test earlier without lagging the IVs by 1 year. 


*** Joint significance test for year dummies

xtreg ln_milexp L.troop_dummy L.ln_milsize L.ln_gdppc L.polity L.civilwar L.terrrivalry L.midhi3 L.defense i.year, fe 
testparm i.year



*** Table 6: Robustness models and graphs


*** FE models 

*IV: troops dummy

xtreg ln_milexp L.troop_dummy L.ln_milsize L.ln_gdppc L.ln_govspend L.polity L.civilwar L.terrrivalry L.midhi3 L.defense i.year, fe 
estimate store m1

* IV: total number of UN peacekeepers (including police and observers) 

xtreg ln_milexp L.ln_max_total_peacekeeper L.ln_milsize L.ln_gdppc L.ln_govspend L.polity L.civilwar L.terrrivalry L.midhi3 L.defense i.year, fe 
estimate store m2

* IV: total number of UN armed forces personel   

xtreg ln_milexp L.lnmaxUN_troops L.ln_milsize L.ln_gdppc L.ln_govspend L.polity L.civilwar L.terrrivalry L.midhi3 L.defense i.year, fe 
estimate store m3

esttab m1 m2 m3 using coeftab04.tex, se wide nogaps varwidth(40) label







